#include "header.h"

int check_sort_rows(int array[1024][1024])
{//Check 1000 Rows. Use after quicksorting the array.
	int faults=0;
	int i=0, j=0;
	for(i=0;i<1000;i++)
	{
		for(j=1;j<1000;j++)
		{
			if(array[i][j]<array[i][j-1])
			{
				faults++;
			}
		}
	}
	return faults;
}

int check_sort_row(int *c)
{//Check Single Row Use after Merging arrays
	int faults=0;
	int i=0;
	for(i=1;i<1000000;i++)
	{
		if(c[i]<c[i-1])
		{
			faults++;
		}
	}
	return faults;
}
